#ifndef SERIALCONFIGDIALOG_H
#define SERIALCONFIGDIALOG_H
#include <QDialog>
#include <QFormLayout>
#include <QLineEdit>
#include <QComboBox>
#include <QPushButton>
#include "serialportmanage.h"

class SerialConfigDialog: public QDialog
{
    Q_OBJECT
public:
    explicit SerialConfigDialog(QWidget *parent = nullptr);
    SerialConfig getConfig() const;
    void setConfig(const SerialConfig &config);

private:
    QLineEdit *m_nameEdit;
    QComboBox *m_portNameCombo;
    QComboBox *m_baudRateCombo;
    QComboBox *m_dataBitsCombo;
    QComboBox *m_parityCombo;
    QComboBox *m_stopBitsCombo;
    QComboBox *m_flowControlCombo;
    QPushButton *m_okButton;
    QPushButton *m_cancelButton;

};

#endif // SERIALCONFIGDIALOG_H
